home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / misc / LEDA_src.lha / LEDA-3.1c-source / src / vga.old / vgalib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-17  |  1.6 KB  |  73 lines

  1. /*******************************************************************************
  2. +
  3. +  LEDA  3.1c
  4. +
  5. +
  6. +  vgalib.h
  7. +
  8. +
  9. +  Copyright (c) 1994  by  Max-Planck-Institut fuer Informatik
  10. +  Im Stadtwald, 6600 Saarbruecken, FRG     
  11. +  All rights reserved.
  12. *******************************************************************************/
  13.  
  14.  
  15.  
  16. #include <LEDA/impl/x_basic.h>
  17. #include <LEDA/bitmaps/leda_icon.xbm>
  18.  
  19. #include <stdlib.h>
  20. #include <string.h>
  21. #include <math.h>
  22.  
  23.  
  24. #if defined(__TURBOC__)
  25. struct WORDREGS { unsigned int    ax, bx, cx, dx, si, di, cflag, flags; };
  26. struct BYTEREGS { unsigned char   al, ah, bl, bh, cl, ch, dl, dh; };
  27. union  REGS { struct  WORDREGS x; struct  BYTEREGS h; };
  28. extern "C" int  int86( int __intno, union REGS _FAR *, union REGS _FAR *);
  29. extern "C" unsigned char inportb(int port_id);
  30. extern "C" void outportb(int portid, unsigned char value);
  31. extern "C" int getch( void );
  32. extern "C" int kbhit( void );
  33. #define MK_FP( seg,ofs )( (void _seg * )( seg ) +( void near * )( ofs ))
  34. #else
  35. #include <dos.h>
  36. #if defined(__GNUG__)
  37. #include <pc.h>
  38. #else
  39. #include <conio.h>
  40. #endif
  41. #endif
  42.  
  43. #if defined(__GNUG__)
  44. #define port_out(value,port) outportb(port,value)
  45. #define port_in(port)  inportb(port)
  46. #else
  47. #if defined(__TURBOC__)
  48. #define port_out(value,port) outportb(port,value)
  49. #define port_in(port)  inportb(port)
  50. #else
  51. #define port_out(value,port) outp(port,value)
  52. #define port_in(port)  inp(port)
  53. #endif
  54. #endif
  55.  
  56.  
  57. #define GRA_I 0x3CE
  58. #define GRA_D 0x3CF
  59.  
  60. extern VIDEO_PTR  VIDEO;
  61. extern int DISP_WIDTH;
  62. extern int DISP_MAX_X;
  63. extern int LINE_BYTES;
  64.  
  65. extern int DISP_HEIGHT;
  66. extern int DISP_MAX_Y;
  67.  
  68. extern int DISP_DEPTH;
  69.  
  70. void vga_init(int mode, int root_col);
  71.  
  72.